home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / mcontrol / testform.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-03-27  |  5.2 KB  |  162 lines

  1. VERSION 5.00
  2. Object = "{6E9164CF-8249-11D1-918B-0020185489F0}#6.0#0"; "MCTRL.OCX"
  3. Begin VB.Form Form1 
  4.    BorderStyle     =   3  'Fester Dialog
  5.    ClientHeight    =   2550
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   3330
  9.    KeyPreview      =   -1  'True
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   2550
  14.    ScaleWidth      =   3330
  15.    ShowInTaskbar   =   0   'False
  16.    StartUpPosition =   3  'Windows-Standard
  17.    Begin MouseCtrl.MouseControl MouseControl1 
  18.       Left            =   2760
  19.       Top             =   1320
  20.       _ExtentX        =   979
  21.       _ExtentY        =   979
  22.    End
  23.    Begin VB.CheckBox Check1 
  24.       Caption         =   "OnTop"
  25.       Height          =   255
  26.       Left            =   1680
  27.       TabIndex        =   7
  28.       Top             =   720
  29.       Value           =   1  'Aktiviert
  30.       Width           =   975
  31.    End
  32.    Begin VB.CommandButton Command1 
  33.       Caption         =   "&Set Cursor"
  34.       Height          =   375
  35.       Left            =   120
  36.       TabIndex        =   2
  37.       Top             =   600
  38.       Width           =   1335
  39.    End
  40.    Begin VB.TextBox Text2 
  41.       Height          =   285
  42.       Left            =   840
  43.       MaxLength       =   4
  44.       TabIndex        =   1
  45.       Text            =   "100"
  46.       Top             =   240
  47.       Width           =   615
  48.    End
  49.    Begin VB.TextBox Text1 
  50.       Height          =   285
  51.       Left            =   120
  52.       MaxLength       =   4
  53.       TabIndex        =   0
  54.       Text            =   "100"
  55.       Top             =   240
  56.       Width           =   615
  57.    End
  58.    Begin VB.Timer Timer1 
  59.       Interval        =   2
  60.       Left            =   2760
  61.       Top             =   720
  62.    End
  63.    Begin VB.Label Label4 
  64.       Caption         =   "Testproject"
  65.       BeginProperty Font 
  66.          Name            =   "Arial"
  67.          Size            =   9.75
  68.          Charset         =   0
  69.          Weight          =   700
  70.          Underline       =   0   'False
  71.          Italic          =   -1  'True
  72.          Strikethrough   =   0   'False
  73.       EndProperty
  74.       Height          =   255
  75.       Left            =   1800
  76.       TabIndex        =   6
  77.       Top             =   360
  78.       Width           =   1335
  79.    End
  80.    Begin VB.Label Label3 
  81.       Caption         =   "MouseControl"
  82.       BeginProperty Font 
  83.          Name            =   "Arial"
  84.          Size            =   12
  85.          Charset         =   0
  86.          Weight          =   700
  87.          Underline       =   0   'False
  88.          Italic          =   -1  'True
  89.          Strikethrough   =   0   'False
  90.       EndProperty
  91.       Height          =   375
  92.       Left            =   1560
  93.       TabIndex        =   5
  94.       Top             =   120
  95.       Width           =   1695
  96.    End
  97.    Begin VB.Label Label2 
  98.       Caption         =   "Press ""4"" for LEFT Double Click Press ""5"" for MIDDLE Double Click Press ""6"" for RIGHT Double Click"
  99.       BeginProperty Font 
  100.          Name            =   "MS Sans Serif"
  101.          Size            =   8.25
  102.          Charset         =   0
  103.          Weight          =   700
  104.          Underline       =   0   'False
  105.          Italic          =   0   'False
  106.          Strikethrough   =   0   'False
  107.       EndProperty
  108.       Height          =   735
  109.       Left            =   120
  110.       TabIndex        =   4
  111.       Top             =   1800
  112.       Width           =   3015
  113.    End
  114.    Begin VB.Label Label1 
  115.       Caption         =   "Press ""1"" for LEFT Click Press ""2"" for MIDDLE Click Press ""3"" for RIGHT Click"
  116.       BeginProperty Font 
  117.          Name            =   "MS Sans Serif"
  118.          Size            =   8.25
  119.          Charset         =   0
  120.          Weight          =   700
  121.          Underline       =   0   'False
  122.          Italic          =   0   'False
  123.          Strikethrough   =   0   'False
  124.       EndProperty
  125.       Height          =   615
  126.       Left            =   120
  127.       TabIndex        =   3
  128.       Top             =   1080
  129.       Width           =   2535
  130.    End
  131. Attribute VB_Name = "Form1"
  132. Attribute VB_GlobalNameSpace = False
  133. Attribute VB_Creatable = False
  134. Attribute VB_PredeclaredId = True
  135. Attribute VB_Exposed = False
  136. Option Explicit
  137. Private Sub Check1_Click()
  138.     If Check1.Value = 1 Then MouseControl1.ontop = True
  139.     If Check1.Value = 0 Then MouseControl1.ontop = False
  140. End Sub
  141. Private Sub Command1_Click()
  142.     MouseControl1.SetMouse Text1.Text, Text2.Text
  143. End Sub
  144. Private Sub Form_KeyPress(KeyAscii As Integer)
  145.     If KeyAscii = 49 Then MouseControl1.LeftClick
  146.     If KeyAscii = 50 Then MouseControl1.MiddleClick
  147.     If KeyAscii = 51 Then MouseControl1.RightClick
  148.     If KeyAscii = 52 Then MouseControl1.LeftDblClick
  149.     If KeyAscii = 53 Then MouseControl1.MiddleDblClick
  150.     If KeyAscii = 54 Then MouseControl1.RightDblClick
  151.     On Error Resume Next
  152.     DoEvents
  153.     Form1.SetFocus ' set the focus back to the project
  154. End Sub
  155. Private Sub Form_Load()
  156.     If Check1.Value = 1 Then MouseControl1.ontop = True
  157.     If Check1.Value = 0 Then MouseControl1.ontop = False
  158. End Sub
  159. Private Sub Timer1_Timer()
  160.     Form1.Caption = "X: " & MouseControl1.x & "  Y: " & MouseControl1.y
  161. End Sub
  162.